﻿using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using MVVM_CAD.Model;
using MVVM_CAD.ViewModel;

namespace MVVM_CAD
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow
    {
        readonly MainViewModel _viewModel;
        public MainWindow()
        {
            InitializeComponent();
            _viewModel = (MainViewModel)DataContext;

        }

        private void CnvPrincipalCanvasMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            //var canvas = (Canvas) sender;
            //var pointInCanvas = new CustomPoint(e.GetPosition(canvas).X, e.GetPosition(canvas).Y);
            //_viewModel.Canvas = canvas;
            //_viewModel.AddFigure(_viewModel.Strategy.PerformMouseLeftClicDownEvent(canvas, pointInCanvas, _viewModel.DrawedFigures));
        }

        private void CnvPrincipalCanvasMouseRightButtonDown(object sender, MouseButtonEventArgs e)
        {
            //var canvas = (Canvas)sender;
            //var pointInCanvas = new CustomPoint(e.GetPosition(canvas).X, e.GetPosition(canvas).Y);
            //_viewModel.Canvas = canvas;
            //_viewModel.AddFigure(_viewModel.Strategy.PerformMouseRightClicDownEvent(canvas, pointInCanvas, _viewModel.DrawedFigures));
        }
    }
}


